package com.loong.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.loong.entity.Emp;
import com.loong.vo.EmpVO;
import org.apache.ibatis.annotations.*;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;

@Mapper
public interface EmpMapper extends BaseMapper<Emp> {
    List<EmpVO> list(@Param("name") String name, @Param("gender") Short gender,
                     @Param("begin") LocalDate begin, @Param("end") LocalDate end);

    @MapKey("pos")
    List<Map<String, Object>> countEmpJobData();

    @MapKey("name")
    List<Map<String, Object>> countEmpGenderData();

    @MapKey("name")
    List<Map<String, Object>> listEmpAndDept();
}
